<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="div01">
		</div>
		<script type="text/javascript">
			// 预加载图像
			var imgs = new Array(15);
			for(var i=0;i<15;i++)
			{
				imgs[i] = new Image();
				console.log("image/"+i+".gif");
				imgs[i].src = "image/"+i+".gif";
				
			}
			// 定时器
			var t;
			// 计数
			var j=0;
			function showpic()
			{
				console.log("showpic");
				// if(j>0)	imgs[j-1].style.opacity = "0";
				// imgs[j].style.opacity = "1";
				div01.append(imgs[j])
				j++;
				if(j==15)
				{
					// clearInterval(t);
					j=0;
					div01.innerHTML = "";
				}
			}
			// 页面加载完成之后开启定时器
			window.onload = function()
			{
				t = setInterval(showpic,100);
			}
		</script>
		
	</body>
</html>